﻿using System;

namespace NanoMvvm
{
    public static class ExceptionHelper
    {
         public static Exception GetInnerMostException(Exception e)
         {
             if (e == null) throw new ArgumentNullException("e");

             while (e.InnerException != null)
                 e = e.InnerException;

             return e;
         }
    }
}